import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useCollectionStore = defineStore('collection', () => {
    const collection = ref<Array<musicList>>([])
    function addCollection(username: string, musicListId: string) {
        let likeItem = {
            id: collection.value.length + 1,
            username: username,
            musicListId: musicListId,
        }
        collection.value.push(likeItem)
    }
    return { collection, addCollection }
})

interface musicList {
    id: Number,
    username: String,
    musicListId: String,
}[]